﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Collections;
using TA.DotNetUtils;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// Server-side group data binding event arguments.
	/// </summary>
	public class RepeaterBindGroupEventArgs : EventArgs
	{
		#region PUBLIC
		#region INIT
		/// <summary>
		/// Ctor.
		/// </summary>
		/// <param name="header"></param>
		/// <param name="footer"></param>
		/// <param name="group"></param>
		public RepeaterBindGroupEventArgs(Control header, Control footer, EntryGroup<int> group)
		{
			this._header = header;
			this._footer = footer;
			this._group = group;
		}
		#endregion
		#region PROPS
		/// <summary>
		/// Gets the container control for the group header.
		/// </summary>
		public Control Header
		{
			get
			{
				return this._header;
			}
		}
		/// <summary>
		/// Gets the container control for the group footer.
		/// </summary>
		public Control Footer
		{
			get
			{
				return this._footer;
			}
		}
		/// <summary>
		/// Gets the group which needs to be bound to the specified <see cref="Header"/> and <see cref="Footer"/>.
		/// </summary>
		/// <remarks>
		/// It contains a collection of all of the entries which fall into this group.
		/// It also contains a collection of sub-groups if this is group does not correspond to the last grouping.
		/// </remarks>
		public EntryGroup<int> Group
		{
			get
			{
				return this._group;
			}
		}
		#endregion
		#endregion
		#region INTERNAL
		#region VARS
		Control _header, _footer;
		EntryGroup<int> _group;
		#endregion
		#endregion
	}
}
